(function($, document) {
	//标题
	$("h1.mui-title")[0].innerText = "惠众娱乐"
	
	//VUE
	var vm = new Vue({
		data:{
			notice:"这是公告这是公告这是公告这是公告这是公告这是公告这是公告"
		},
		mounted(){
			//幻灯片执行
			$(".mui-slider").slider({
				interval: 2000
			});
			
			//公告自动滚动
			var speed = 1,
				curLeft = 0,
				$txt = document.querySelector("#notice>.txt"),
				$aTxt = document.querySelector("#notice>.txt>a");
			var aTxtWidth = $aTxt.offsetWidth,
				txtWidth = $txt.offsetWidth;
			if (aTxtWidth > txtWidth) {
				setInterval(function() {
					curLeft += speed;
					if (curLeft > aTxtWidth - txtWidth + 5) {
						curLeft = 0
					}
					$txt.scrollTo(curLeft, 0)
				}, 40)
			}
		}
	}).$mount("#app")
})(mui, document)